home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / daydreambbs114.lha / Developer / DoorMessage.Structure < prev    next >
Text File  |  1995-08-02  |  26KB  |  567 lines

  1.  
  2.                    DayDream BBS: Door Control Structure
  3.                    ------------------------------------
  4.  
  5. OFFSET  TYPE     LENGTH  DESCRIPTIO.N                                     FLAGS
  6. ==============================================================================
  7.  0000   WORD       02    DOOR COMMAND ID / RETURN CODE                     (-)
  8.  0002   LONG WORD  04    COMMAND DATA FIELD #1                             (-)
  9.  0006   LONG WORD  04    COMMAND DATA FIELD #2                             (-)
  10.  0010   LONG WORD  04    COMMAND DATA FIELD #3                             (-)
  11.  0014   STRING     86    ROOM FOR MISCELLANEOUS VARIABLES                  (-)
  12.  0100   -- END --  00    END OF DOOR CONTROL STRUCTURE                     (-)
  13. ==============================================================================
  14.  
  15.  
  16.                         DayDream BBS: Door Commands
  17.                         ---------------------------
  18.  
  19. ===( ID: 00000 - Exit Door Handler )==========================================
  20.  
  21. Function  : This  command  reports DayDream  BBS that the door  is about to
  22.             terminate. DayDream will ReplyMsg() to this request, which will
  23.             be the last activity between the door program and DayDream BBS.
  24.             DD_DoorHandler will be closed and user returned  to the system.
  25.  
  26. Parameters: None
  27.  
  28. Returns   : Return code of zero to indicate exit
  29.  
  30. ===( ID: 00001 - Type String )================================================
  31.  
  32. Function  : Prints specified string of characters to remote user's display,
  33.             local screen or both. Possible ANSI codes will be automatically
  34.             stripped, if user has chosen an ASCII display mode. When in need
  35.             of changing line, string only needs to contain a linefeed, carriage
  36.             return (ASCII 13) will be inserted automatically.
  37.  
  38. Parameters: Data 1 <> Pointer to the string
  39.  
  40. Note      : You can include carriage returns in the text to use several lines,
  41.             but remember not to type anything longer than 200 lines at once.
  42.  
  43. Returns   : NULL in case of a fatal error or 1L when succesful
  44.  
  45. ===( ID: 00002 - Prompt For User Input )======================================
  46.  
  47. Function  : Prompts user to enter a string. Length will  be restricted as
  48.             requested by the door. Full support for ANSI cursor sequences
  49.             is given, so that user can easily move through the string and
  50.             modify as required.
  51.  
  52. Parameters: Data 1 <> Pointer to the buffer, where the final string will be
  53.                       inserted. To  define a default  string, put  it here,
  54.                       otherwise you MUST specify a NULL-string.
  55.             Data 2 <> Specify maximum length in upper word and a few control
  56.                       bits in the lower one.
  57.  
  58.                       BIT  WHAT WILL HAPPEN IF BIT IS SET
  59.                       ======================================================
  60.                        0   Hidden mode, print *s instead of real characters
  61.                        1   Don't print CR+LF after receiving return code
  62.                        2   Don't allow any characters illegal in filenames
  63.  
  64. Returns   : NULL in case of a fatal error or 1L when succesful
  65.  
  66. ===( ID: 00003 - Inquire Structure Pointers )=================================
  67.  
  68. Function  : This command will return with pointers to several significant
  69.             system structures, such as user structure etc.
  70.  
  71. Parameters: None
  72.  
  73. Returns   : Data 1 <> Various bits concerning system settings:
  74.  
  75.                       BIT  MEANING WHEN SET
  76.                       ======================================================
  77.                        0   Remote connection, otherwise local only
  78.  
  79.             Data 2 <> User's actual last call date and time
  80.  
  81.             Misc 1 <> Array of long word pointers as follows:
  82.  
  83.                       OFFSET  POINTER
  84.                       ==================================================
  85.                        0000   Dos-Library Base Address
  86.                        0004   Intuition-Library Base Address
  87.                        0008   Graphics-Library Base Address
  88.                        0012   ReqTools-Library Base Address
  89.                        0016   DiskFont-Library Base Address
  90.                        0020   Timer-Device Base
  91.                        0024   DayDream BBS Server Unit Message Port
  92.                        0028   Archivers.DAT Pointer
  93.                        0032   DayDream.DAT Pointer
  94.                        0036   Display.DAT Pointer
  95.                        0040   Pointer To Current Display Mode Structure
  96.                        0044   Conferences.DAT Pointer
  97.                        0048   Pointer To Current Conference Structure
  98.                        0052   Pointer To Current Conference's Message Bases
  99.                        0056   Pointer To Current Message Base Structure
  100.                        0060   Protocols.DAT Pointer
  101.                        0064   DayDream BBS Screen Pointer
  102.                        0068   Pointer To Current User's Structure
  103.                        0072   ExternalCommands.DAT Pointer
  104.                        0076   Schedule.DAT Pointer
  105.                        0080   Pointer to a string containing door parameters
  106.  
  107. Note      : These pointers  are provided to save  you from some  typing. For
  108.             example, you could just pick the library bases from here without
  109.             having to open them yourself.
  110.  
  111. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  112.  
  113. ===( ID: 00004 - Type ASCII/ANSI File )=======================================
  114.  
  115. Function  : This command outputs an ASCII or ANSI file into remote terminal,
  116.             local screen or both.
  117.  
  118. Parameters: Data 1 <> Pointer to the filename
  119.             Data 2 <> Nothing
  120.             Data 3 <> Control bits as follows:
  121.  
  122.                       BIT  WHAT WILL HAPPEN IF SET
  123.                       ==================================================
  124.                       000  Add correct path and file extension according
  125.                            to the current display mode settings. If this
  126.                            bit is set, you only need to specify the file
  127.                            name itself. Final name could look like, say,
  128.                            DayDream:Display/ISO/<filename>.GFX.Otherwise
  129.                            DayDream  will attempt  to directly open  the
  130.                            file, without any modifications on it's name.
  131.                       001  In case file couldn't be found,show a visible
  132.                            error message instead of quiting quietly.
  133.                       002  Strip fidonet kludges
  134.                       003  Check file from Conferences directory
  135.                       004  Check if there's file for the current  access
  136.                            level.
  137.                       005  Disable control chars
  138.  
  139. ===( ID: 00005 - Prompt User For Simple Yes Or No  )==========================
  140.  
  141. Function  : This function asks user to answer a simple yes or no question.
  142.             Door program must type the question by itself, since  all this
  143.             function outputs is an ASCII string "Yes" or "No" based on the
  144.             user's answer.
  145.  
  146. Parameters: Data 1 <> Default answer: 0 = No and 1 = Yes
  147.  
  148. Returns   : Data 1 <> User's answer using the values stated above
  149.             R-Code <> NULL in case of a fatal error or 1L when succesful
  150.  
  151. ===( ID: 00006 - Scan UserBase For Specified User Account )===================
  152.  
  153. Function  : This function scans user database (UserBase.DAT) in order to find
  154.             the specified  account. Match can be made in real name or handle.
  155.             Operation is fully non-case-sensitive.
  156.  
  157. Parameters: Data 1 <> Pointer to the search string, wildcards are NOT supported
  158.             Data 2 <> In case one account, for a reason or an another, has to
  159.                       be skipped, it's offset must be provided here. Supply -1L
  160.                       to disable this feature.
  161.  
  162. Returns   : Data 1 <> An offset to the matching account if one was found in the
  163.                       first place. Check >R-Code< first.
  164.             Data 2 <> NULL if match was in user's real name or 1L if it was in
  165.                       the handle.
  166.             R-Code <> NULL if an error occurred, 1W if no match was found or
  167.                       2W when a match was found. If this value is <> 2W, fields
  168.                       Data 1 and Data 2 may contain just about any value.
  169.  
  170. ===( ID: 00007 - UpDate DayDream Data Structures )============================
  171.  
  172. Function  : This function must be called after any DayDream structure has
  173.             been modified. Please remember to observe extreme cautiousness,
  174.             since careless modifications will lead to a system crash.
  175.  
  176. Parameters: Data 1 <> Pass NULL for compability with future revisions
  177.             Data 2 <> Pass NULL for compability with future revisions
  178.             Data 3 <> Pass NULL for compability with future revisions
  179.  
  180. Returns   : R-Code <> NULL if an error occurred and 1L when successful
  181.  
  182. ===( ID: 00008 - Convert an UNiX Style Date To An ASCII String )================
  183.  
  184. Function  : This function will convert an UNiX style date and time values to
  185.             plain ASCII strings. Time can be read from system clock if asked to.
  186.  
  187. Parameters: Data 1 <> Pointer to a work area of twenty bytes  in which DayDream
  188.                       will store the output string 'DD.MM.YYYY',0,'HH:MM:SS',0.
  189.                       DO NOT count on  DayDream setting '.' and ':'  characters
  190.                       between numerical  values; you have to set them yourself!
  191.                       Note that entries will be provided as in Europe.
  192.             Data 2 <> Amount of seconds since 1.1.1978 to  be converted, or -1L
  193.                       to read value from the system clock.
  194. Returns   : Data 1 <> Amount of seconds converted into a string
  195.             R-Code <> NULL if an error occurred and 1L when successful
  196.  
  197. ===( ID: 00009 - Perform File Transfer With A XPR-Protocol )====================
  198.  
  199. Function  : Purpose of this function is to provide an easy way to handle file
  200.             transfers. It is possible to perform  both send and  receive with
  201.             this function. Operation will be fully automatic and independent.
  202.  
  203. Parameters: Data 1 <> Pointer to a data block, consisting of NULL-terminated
  204.                       strings including paths and actual file names of files
  205.                       to be transferred. End  of the block will be  signaled
  206.                       with a $FF (Byte). When receiving, simply pass address
  207.                       of a block containing NULL + termination character.
  208.             Data 2 <> When up, lowest bit will  indicate  send. Otherwise,
  209.                       receive mode will be executed. Leave other bits down
  210.                       for future compability.
  211.             Misc 1 <> Table of miscellaneous variables as follows:
  212.  
  213.                       OFFSET   TYPE     MEANING
  214.                       =======================================================
  215.                        0000    LONG     Pointer to a valid AmigaDOS pathname.
  216.                                         When sending, files with no path spec
  217.                                         will be  looked for in this path, and
  218.                                         when receiving, files will be  placed
  219.                                         in this directory.
  220.  
  221. Returns:    R-Code <> NULL if an error occurred and 1L when successful
  222.  
  223. ===( ID: 00010 - GET OR SET LASTREAD AND AUTOSCAN MAIL POINTERS )===============
  224.  
  225. Function  : This function makes it easy to read and set last read and auto scan
  226.             pointers of any user. Please  be extremely  careful when  modifying
  227.             these values,since failed modifications may lead to a unrecoverably
  228.             corrupted message base.
  229.  
  230. Parameters: Data 1 <> This fields actually consist of three separate values:
  231.  
  232.                       Lower  Word (Bits 00-15) /
  233.  
  234.                       Lower  Byte (Bits 00-07) = Conference number
  235.                       Higher Byte (Bits 08-15) = Message Base Number
  236.  
  237.                       Higher Word (Bits 16-31) = Account Number or NULL
  238.  
  239.                       By passing a value of NULL  in the higher word, actions
  240.                       will be made on the  current user. In case of any other
  241.                       value, changes  will be made to the <n>th  account. So,
  242.                       a value of 1 would make this function to operate on the
  243.                       very first structure found from the MsgBase.LRP file.
  244.  
  245.             Data 2 <> Pass NULL when only READing AutoScan  and LastRead values.
  246.                       If you want to  write new  values, specify  new  value for
  247.                       AutoScan in the lower word, and LastRead in the upper one.
  248.  
  249.             Data 3 <> Pass NULL for compability with future revisions
  250.  
  251. Returns   : Data 1 <> Lower  Word (Bits 00-15) = Auto Scan Pointer
  252.                       Higher Word (Bits 15-31) = Last Read Pointer
  253.  
  254.                       Note: When setting new values, old pointers will be
  255.                             returned.
  256.  
  257.             R-Code <> NULL if an error occurred and 1L when successful
  258.  
  259. ===( ID: 00011 - WAIT FOR A HOTKEY )============================================
  260.  
  261. Function  : This function simply waits for a single keypress from either the
  262.             local console or remote  terminal. After receiving a  character,
  263.             this function will immediately return with no further activity.
  264.  
  265. Parameters: Data 1 <> Parameters: BiT  WHAT WILL HAPPEN IF SET
  266.                                   ==========================================
  267.                                   000  Received character will be printed to
  268.                                        the local and remote screens.
  269.                                   001  Carriage Return  (CR=$0D) & Line Feed
  270.                                        (LF=$0A) will be included and printed
  271.                                        after the actual character. Note that
  272.                                        this won't do a thing unless BiT 0 is
  273.                                        also set.
  274.                   002  Check cursor keys. If this is active,
  275.                        cursor keys will be returned as  fol-
  276.                        lows:
  277.  
  278.                        250 - Up
  279.                        251 - Down
  280.                        252 - Right
  281.                        253 - Left
  282.  
  283.             Data 2 <> Pass NULL for compability with future revisions
  284.             Data 3 <> Pass NULL for compability with future revisions
  285.  
  286. Returns   : R-Code <> Received character or NULL if failed
  287.             Data 1 <> If character came from serial -> 0
  288.                                              console -> 1
  289.  
  290. Note      : The character is located in the upper byte of the word.
  291.             Therefore you should read it as a byte from offset 0.
  292.  
  293. ===( ID: 00012 - SCAN FILE DIRECTORIES )========================================
  294.  
  295. Function  : This function will scan all the file directories in the specified
  296.             conference and see if any of the files matches with given string;
  297.             wildcards allowed, of course. When a match is found, this routine
  298.             will  call a hook  routine with path, name  and size of  the file 
  299.             as it's  parameters allowing it to process the file in any wanted
  300.             way. After  the hook has  returned, scanning will or will  not be
  301.             continued depending on  whether  the search  string contained any
  302.             wildcards (if it didn't, no more than one match is possible).
  303.  
  304. Parameters: Data 1 <> Conference number in the lowest byte. Leave bits from
  305.                       eight (8) to thirtyone (31) down for compability with
  306.                       future revisions.
  307.             Data 2 <> Pointer to the search string, wildcards allowed.
  308.             Data 3 <> Pointer to the hook routine to call:
  309.  
  310.                       Hook(Path, Filename, Size, UserData);
  311.                            A0    A1        D0    D1
  312.  
  313.                       >WARNING< HOOK ROUTINE MAY ABSOLUTELY NOT
  314.                       MODIFY ANY SYSTEM   REGISTERS  UNLESS THE
  315.                       ORIGINAL VALUES ARE RETURNED BEFORE EXIT!
  316.  
  317.                       If this is NULL, use File tagging-routines of DayDream.
  318.  
  319.             Misc 1 <> Table of miscellaneous variables as follows:
  320.  
  321.                       OFFSET   TYPE     MEANING
  322.                       =======================================================
  323.                        0000    LONG     User  data  variable - will be  given
  324.                                         to Hook() routine  as provided  here.
  325.                                         This  will just pass  through DD  and
  326.                                         doesn't   have  any effect   on  DD's
  327.                                         operation. With  this  field you  can
  328.                                         easily pass some data to your hook.
  329.  
  330. Returns   : R-Code <> One of the following:
  331.  
  332.                       0 - Operation successful
  333.                       1 - Not enough memory (only 2048 bytes needed)
  334.                       2 - Specified conference not found
  335.                       3 - Specified conference doesn't have any file directories
  336.  
  337. ===( ID: 00013 - ADD FILE TO A DOWNLOAD REQUEST )===============================
  338.  
  339. Function  : This function will add a file to the download request. Current dload
  340.             request will be checked first to avoid  possible duplicate  entries.
  341.             If no duplicate entry or other  errors occurred, file will  be added
  342.             to the filechain.
  343.  
  344. Parameters: Data 1 <> Pointer  to the  path  where the file  to be added  can be
  345.                       found. PATH MUST END WITH A SLASH ('/') OR COLON (':')!
  346.             Data 2 <> Pointer to the actual filename (format: FILENAME.EXT)
  347.             Data 3 <> Some parameters as follows:
  348.  
  349.                       BIT    MEANING IF SET
  350.                       =====================================================
  351.                       000    FREE DOWNLOAD
  352.                              - File will be flagged even though ratios
  353.                                wouldn't normally allow it.
  354.                              - Downloading  this file  won't  increase 
  355.                                downloaded files / bytes counters.
  356.  
  357.             Misc 1 <> Table of miscellaneous variables as follows:
  358.  
  359.                       OFFSET   TYPE     MEANING
  360.                       =======================================================
  361.                        0000    LONG     SIZE OF THE FILE IN BYTES
  362.  
  363. Returns   : R-Code <> One of the following:
  364.  
  365.                       0 - Operation successful
  366.                       1 - Duplicate entry found
  367.                       2 - File ratio problems
  368.                       3 - Byte ratio problems
  369.                       4 - Not enough memory
  370.  
  371. ===( ID: 00014 - Disconnect user )===========================================
  372.  
  373. Function  : This function will disconnect user from BBS.
  374.  
  375. Parameters: None
  376.  
  377. Returns   : Nothing
  378.  
  379. ===( ID: 00015 - Run DayDream Command )======================================
  380.  
  381. Function  : Allows use of DayDream's menu commands (also doors).
  382.  
  383. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  384.  
  385. Returns   : Nothing
  386.  
  387. ===( ID: 00016 - Reset idle counter )========================================
  388.  
  389. Function  : This function will reset the idle-counter. Useful for doors
  390.         having own serial/console routines, before and after archiving
  391.         something etc. Note that hotkey, prompt etc. routines reset
  392.         the idle counter automatically.
  393.  
  394. Parameters: None
  395.  
  396. Returns   : Nothing
  397.  
  398. ===( ID: 00017 - Relogin )===================================================
  399.  
  400. Function  : Same as exit door handler, except this will relogin user to the
  401.             system.
  402.  
  403. Parameters: None
  404.  
  405. Returns   : Nothing
  406.  
  407. ===( ID: 00018 - Inquire Structure Pointers 2 )==============================
  408.  
  409. Function  : This command will return with pointers to several significant
  410.             system structures, such as selected areas etc..
  411.  
  412. Parameters: None
  413.  
  414. Returns   : Data 1 <> Bps rate of current call
  415.  
  416.             Misc 1 <> Array of long word pointers as follows:
  417.  
  418.                       OFFSET  POINTER
  419.                       ==================================================
  420.                        0000   Node Structure
  421.                0004   Node Structure of current node
  422.                        0008   Pointer to incoming conversion table or null
  423.                0012   Pointer to outgoing conversion table or null
  424.                0016   Pointer to Security data of current user
  425.                        0020   Pointer to current Selected.DAT
  426.                0024   Pointer to IO-Device.DAT of current node
  427.                0028   Pointer to the door name
  428.                0032   Pointer to MultiNode.DAT
  429.  
  430. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  431.  
  432. ===( ID: 00019 - Join Conference )============================================
  433.  
  434. Function  : This function allows you to change conference.
  435.  
  436. Parameters: Data 1 <> Number of conference to join.
  437.             Data 2 <> Some parameters as follows:
  438.  
  439.                       BIT    MEANING IF SET
  440.                       =====================================================
  441.                       000    Ask new conference if not found.
  442.               001    Quick mode. This won't load any conference
  443.                  related files etc. If you use this, you MUST
  444.                  return to the original conference before exiting.
  445.               002    Skip JoinConference.TXT|GFX
  446.  
  447. ===( ID: 00020 - Change Msg Base )============================================
  448.  
  449. Function  : This function allows you to change message base.
  450.  
  451. Parameters: Data 1 <> Number of message base to change.
  452.             Data 2 <> Some parameters as follows:
  453.  
  454.                       BIT    MEANING IF SET
  455.                       =====================================================
  456.                       000    Show menu if Data 1 = 0.
  457.               001    Do not type messagebase status fields after
  458.                  changing the message base.
  459.  
  460. ===( ID: 00021 - Run internal command )=======================================
  461.  
  462. Function  : Same as "Run DayDream command" expect only INTERNAL commands
  463.         will be executed. So external commands will be skipped.
  464.  
  465. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  466.  
  467. Returns   : Nothing
  468.  
  469. ===( ID: 00022 - Check for character )========================================
  470.  
  471. Function  : This function just checks if theres character in input buffer
  472.         and if there is, then returns it. Otherwise returns null.
  473.  
  474. Parameters: None
  475.  
  476. Returns   : The character is located in the upper byte of the word.
  477.             Therefore you should read it as a byte from offset 0.
  478.  
  479. ===( ID: 00023 - Edit File )==================================================
  480.  
  481. Function  : Edit file using DD's built in line editor.
  482.  
  483. Parameters: Data 1 <> Filename to edit (MODE_NEWFILE).
  484.  
  485. Returns   : Nothing.
  486.  
  487. ===( ID: 00024 - FIFO Execute )===============================================
  488.  
  489. Function  : Execute command and route output to serial and console using
  490.             FIFO:-shell. User may not input anything.
  491.  
  492. Parameters: Data 1 <> Command to execute. Following control-chars supported:
  493.  
  494.           %N = Node, %H = Handle, %R = Real name, %S = Screen length
  495.  
  496. Returns   : Nothing.
  497.  
  498. ===( ID: 00025 - Write Log )==================================================
  499.  
  500. Function  : Write specified text to the logfile.
  501.  
  502. Parameters: Data 1 <> Text to write. Following control-chars supported:
  503.  
  504.               %A = ARQ Report
  505.               %B = Baudrate
  506.               %D = Date
  507.               %H = Handle
  508.               %L = Location
  509.               %N = Node
  510.               %O = Organization
  511.               %S = Security
  512.               %T = Time
  513.               %U = Real name
  514.  
  515. Returns   : Nothing.
  516.  
  517. ===( ID: 00026 - Clean Temporary Directory )==================================
  518.  
  519. Function  : Clean temporary directory of the current node
  520.  
  521. Parameters: None
  522.  
  523. Return    : Nothing.
  524.  
  525. ===( ID: 00027 - WAIT FOR A HOTKEY 2 )========================================
  526.  
  527. Function  : This function simply waits for a single keypress from either the
  528.             local console or remote  terminal or a timeout. After receiving a
  529.             character or timeout, this function will immediately return with
  530.             no further activity.
  531.  
  532. Parameters: Data 1 <> Parameters: BiT  WHAT WILL HAPPEN IF SET
  533.                                   ==========================================
  534.                                   000  Received character will be printed to
  535.                                        the local and remote screens.
  536.                                   001  Carriage Return  (CR=$0D) & Line Feed
  537.                                        (LF=$0A) will be included and printed
  538.                                        after the actual character. Note that
  539.                                        this won't do a thing unless BiT 0 is
  540.                                        also set.
  541.                   002  Check cursor keys. If this is active,
  542.                        cursor keys will be returned as  fol-
  543.                        lows:
  544.  
  545.                        250 - Up
  546.                        251 - Down
  547.                        252 - Right
  548.                        253 - Left
  549.  
  550.             Data 2 <> Timeout in secs
  551.             Data 3 <> Pass NULL for compability with future revisions
  552.  
  553. Returns   : R-Code <> Received character or NULL if failed. -1 if timeout.
  554.             Data 1 <> If character came from serial -> 0
  555.                                              console -> 1
  556.  
  557. Note      : The character is located in the upper byte of the word.
  558.             Therefore you should read it as a byte from offset 0.
  559.  
  560. ===( ID: 00028 - Change activity )============================================
  561.  
  562. Function  : Change activity that is shown in server and who-command.
  563.  
  564. Parameters: Data 1 <> Pointer to string containing activity.
  565.  
  566. Returns   : Nothing.
  567.